          
          
         
            //var originalWidth = consultWidth = window.innerWidth;
            //var linkJumpCount = 16;
            var linkHref;
            var beginningDelay = null;
            var animateDelayCount = 4000;
            //var watchBrowse = null;

            //first ele add class
            function fstAddClass(){
                for(var c = 0;c < $('.addFst').length;c++){
                    $('.addFst:eq(' + c + ')>*:first-child').addClass('active');
                }
            }
            
            function countDown(){
                    linkJumpCount -= 1;
                
                    //linkJumpCount=0时，跳转页面
                    if(linkJumpCount <= 0){
                        location.href = linkHref;
                    }

                    //每秒执行一次,showTime()
                    setTimeout("countDown()",100);
            }

            function GetQueryString(name) {  
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
                var r = window.location.search.substr(1).match(reg);  //获取url中"?"符后的字符串并正则匹配
                var context = "";  
                if (r != null)  
                     context = r[2];  
                reg = null;  
                r = null;  
                return context == null || context == "" || context == "undefined" ? "" : context;  
            }
            
            //禁止滚动
            function onMouseScroll(event) {
                    event.preventDefault();
                    var wheel = e.originalEvent.wheelDelta || -e.originalEvent.detail;
                    var delta = Math.max(-1, Math.min(1, wheel) );
                    if(delta < 0){//向下滚动
                        scrollDown = true;
                    }else{//向上滚动
                        scrollDown = false;
                    }
            }
            //内容高度是否小于屏幕高度
            function checkContnHeight(){
                if($('.container')[0].offsetHeight < window.innerHeight){
                    $('.container').addClass('fillAll');
                }
            }
            //前进后退页面处于顶部
            function beginningAtTop(){
                setTimeout(function(){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                },10)
            }

            //判断是否为移动设备
            function browserRedirect(){
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                    $('body').addClass('mobileDevice');
                    return true;
                }else{
                    return false;
                }
            }
            var watchScale = null;
            var picSwp = new Swiper('footer .scale .picSwp',{

            });
            watchScale = setInterval(function(){
                if(!$('.scale.active').length) return false;
                if($('.scale.active .picSwp .swiper-slide:first-child')[0].className.indexOf('active') >= 0){
                    $('.scale.active .btn').removeClass('disable');
                    $('.scale.active .prev').addClass('disable');
                }else if($('.scale.active .picSwp .swiper-slide:last-child')[0].className.indexOf('active') >= 0){
                    $('.scale.active .btn').removeClass('disable');
                    $('.scale.active .next').addClass('disable');
                }else{
                    $('.scale.active .btn').removeClass('disable');
                }
                if($('.scale.active .picNav .active').index() != $('.scale.active .swiper-slide-active').index()){
                    $('.scale.active .picNav p').removeClass('active');
                    $('.scale.active .picNav p').eq($('.scale.active .swiper-slide-active').index()).addClass('active')
                    $('.scale.active .num .curr').text($('.scale.active .swiper-slide-active').index() + 1);
                }
                if(!$('.scale.active .picSwp .swiper-slide-active .sm').length && $('.scale.active .picSwp .swiper-slide .sm').length){
                    $('.scale.active .picSwp .swiper-slide .sm').removeClass('sm');
                }
                if(!$('.scale.active .picSwp .swiper-slide-active .sclIcon').length){
                    $('.scale.active .swiper-slide-active .pic').append($('.sclIcon')[0]);
                }
            },10)
            
            $(document).ready(function(){
                    browserRedirect(); 
                    fstAddClass();
                    //setTimeout(checkContnHeight,10);
                    $('header .head_logo .menuBtn').click(function(){
                        $(this).parents('header').addClass('active');
                    })
                    $('header .shadow').click(function(){
                        $(this).parents().removeClass('active');
                    })
                    function currentLink(url){
                        for(var m = 0;m < $('header .mobileMenu a').length;m++){
                            console.log($('header .mobileMenu a').eq(m).attr('href'));
                            if(url.indexOf($('header .mobileMenu a').eq(m).attr('href')) >= 0){
                                $('header .mobileMenu a').eq(m).addClass('active');
                                break;
                            }
                        }
                        for(var h = 0;h < $('.p_top a').length;h++){
                            console.log($('.p_top a').eq(h).text());
                            if(url.indexOf($('.p_top a').eq(h).attr('href')) >= 0){
                                $('.p_top a').eq(h).addClass('active');
                                return false;
                            }
                        }

                        for(var n = 0;n < $('header .head_dha li a').length;n++){
                            if(url.indexOf($('header .head_dha li a').eq(n).attr('href')) >= 0){
                                $('header .head_dha li a').eq(n).addClass('active');
                                break;
                            }
                        }
                    }
                    var nowHref = window.location.href;
                    currentLink(nowHref);
                    $('footer .newest li .recent p').click(function(){
                        $('footer .scale').addClass('active');
                        var ind = $(this).index();
                        picSwp.params.speed = 0;
                        picSwp.slideTo(ind);
                        $('footer .scale .num .curr').text(ind + 1);
                        $('footer .scale .picNav p').removeClass('active');
                        $('footer .scale .picNav p').eq(ind).addClass('active');
                        setTimeout(function(){
                            picSwp.params.speed = 300;
                        },10)
                    })
                    $('footer .scale .picNav p').click(function(){
                        var ind = $(this).index();
                        picSwp.slideTo(ind);
                        $('footer .scale .num .curr').text(ind + 1);
                    })
                    $('footer .scale .swiper-slide .pic').click(function(){
                        if(window.innerWidth <= 1100) return false;
                        $(this).addClass('sm');
                    })
        
                    $('footer .scale .close').click(function(){
                        $('footer .scale').removeClass('active');
                    })
                    $('footer .scale .btn').click(function(){
                        if($(this)[0].className.indexOf('prev') >= 0){
                            picSwp.slidePrev();
                        }else{
                            picSwp.slideNext();
                        }
                    })
                    
                    $('[hoverPic]').mousemove(function(even){
                        if($('footer .scale .swiper-slide .pic.sm').length) return false;
                        var offset = $(this).parent()[0].getBoundingClientRect();
                        var x = even.clientX - offset.left;
                        var y = even.clientY - offset.top;
                        $('footer .scale .sclIcon')[0].style.cssText = "left: " + x + 'px;top: ' + y + 'px;';
                    }).mouseout(function(){
                        
                    });
                    /*$('a').click(function(e){
                        
                            linkHref = $(this).attr('href');
                            e = e || window.event;
                            e.cancelBubble = true;
                            e.stopPropagation();
                            if(e.preventDefault){ // w3c
                                e.preventDefault();
                            } else { // ie
                                e.returnValue = false;
                            }
                            countDown();
                            $('.leaving').addClass('jump');
                            $('.container').addClass('jump');
                    })*/
                    
            })

            /*function load (){ 
                document.addEventListener('touchstart',touch, {passive:false}); 
                document.addEventListener('touchmove',touch, {passive:false}); 
                document.addEventListener('touchend',touch, {passive:false}); 
                function touch (event){ 
                    var event = event || window.event; 
                    switch(event.type){ 
                        case "touchstart": 
                            console.log("Touch started (" + event.touches[0].clientX + "," + event.touches[0].clientY + ")"); 
                            break; 
                        case "touchend": 
                            console.log("<br>Touch end (" + event.changedTouches[0].clientX + "," + event.changedTouches[0].clientY + ")"); 
                            break; 
                        case "touchmove": 
                            event.preventDefault(); 
                            console.log("<br>Touch moved (" + event.touches[0].clientX + "," + event.touches[0].clientY + ")"); 
                            break; 
                    }
                } 
            } 
            window.addEventListener('load',load, false);*/
            //$(document).on('mousewheel DOMMouseScroll', onMouseScroll);
            

        